



#{extends 'main.html' /}

<script language="javascript" type="text/javascript">
function check(frm) {
	document.getElementById("saveAsDraft").value= false;	
	frm.submit();
}
function check1(frm) {
	alert('Your Request Has Been Saved As Draft.');
	document.getElementById("saveAsDraft").value= true;	
	frm.submit();
	
}
function showAlert()
{alert('Your Request Has Been Saved As Draft.');
}


</script>
<form action="@{Ideas.postIdeaInEntity()}" method="post">
Title: <input type="text" name="title" /> 
Idea detail : 
<br/>
<input type="hidden" name="entityId" value=${entity.id} /> 
<textarea wrap="virtual" 
	name="ideaDetail" rows=3 cols=20 maxlength=100></textarea><br> 
<input type="hidden" name= "saveAsDraft" id="saveAsDraft" value=false /> 
<input type="button" value="post" onclick="check(this.form)"/>
<br/>
<input type="button" value="SaveAsDraft" onClick="check1(this.form)"/>
</form>








